﻿using System;

class IntValuesExchange

            // Write an if statement that examines two integer variables and exchanges their values if the first one is greater than the second one.

{
    static void Main()
    {
        Console.WriteLine("Enter two numbers");
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        int c = b;
        if (a > b)
            {
                c = a;
                a = b;
                b = c;
                Console.WriteLine("The first number is greater than the second!");
                Console.WriteLine("So when values are exchanged...\n the first number has value of: {0}\n and the second has value of: {1}", a, b);
            }
        else
            {
                Console.WriteLine("The second number is greater than the first so exchange is not needed!");
            }
    }
}

